import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import tailwindcss from "tailwindcss";
import path from "node:path";
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    uni()
  ],
  css: {
    postcss: {
      plugins: [
        tailwindcss({
          config: path.resolve(__dirname, "tailwind.config.cjs")
        })
      ]
    }
  },
  server: {
    proxy: {
      "/dev-api": {
        target: "http://localhost:13384",
        // target: "http://192.168.0.77:13384",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/dev-api/, "")
      }
    }
  }
});
